package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * SkillVerify generated by hbm2java
 */
@Entity
@Table(name = "skill_verify")
public class SkillVerify implements java.io.Serializable {

	private Long id;
	private UserBaseInfo userBaseInfoByCheckId;
	private WorkOrder workOrder;
	private UserBaseInfo userBaseInfoByTeacherId;
	private AirplaneModel airplaneModel;
	private byte checkType;
	private Date createDate;
	private Date examDate;
	private Set<TrainPlan> trainPlans = new HashSet<TrainPlan>(0);

	public SkillVerify() {
	}

	public SkillVerify(byte checkType) {
		this.checkType = checkType;
	}

	public SkillVerify(UserBaseInfo userBaseInfoByCheckId, WorkOrder workOrder,
			UserBaseInfo userBaseInfoByTeacherId, AirplaneModel airplaneModel,
			byte checkType, Date createDate, Date examDate,
			Set<TrainPlan> trainPlans) {
		this.userBaseInfoByCheckId = userBaseInfoByCheckId;
		this.workOrder = workOrder;
		this.userBaseInfoByTeacherId = userBaseInfoByTeacherId;
		this.airplaneModel = airplaneModel;
		this.checkType = checkType;
		this.createDate = createDate;
		this.examDate = examDate;
		this.trainPlans = trainPlans;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CHECK_ID")
	public UserBaseInfo getUserBaseInfoByCheckId() {
		return this.userBaseInfoByCheckId;
	}

	public void setUserBaseInfoByCheckId(UserBaseInfo userBaseInfoByCheckId) {
		this.userBaseInfoByCheckId = userBaseInfoByCheckId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "WORK_ID")
	public WorkOrder getWorkOrder() {
		return this.workOrder;
	}

	public void setWorkOrder(WorkOrder workOrder) {
		this.workOrder = workOrder;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TEACHER_ID")
	public UserBaseInfo getUserBaseInfoByTeacherId() {
		return this.userBaseInfoByTeacherId;
	}

	public void setUserBaseInfoByTeacherId(UserBaseInfo userBaseInfoByTeacherId) {
		this.userBaseInfoByTeacherId = userBaseInfoByTeacherId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AIRPLANE_MODEL_ID")
	public AirplaneModel getAirplaneModel() {
		return this.airplaneModel;
	}

	public void setAirplaneModel(AirplaneModel airplaneModel) {
		this.airplaneModel = airplaneModel;
	}

	@Column(name = "CHECK_TYPE", nullable = false)
	public byte getCheckType() {
		return this.checkType;
	}

	public void setCheckType(byte checkType) {
		this.checkType = checkType;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATE", length = 19)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "EXAM_DATE", length = 19)
	public Date getExamDate() {
		return this.examDate;
	}

	public void setExamDate(Date examDate) {
		this.examDate = examDate;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "skillVerify")
	public Set<TrainPlan> getTrainPlans() {
		return this.trainPlans;
	}

	public void setTrainPlans(Set<TrainPlan> trainPlans) {
		this.trainPlans = trainPlans;
	}

}
